{% extends 'base.html' %}
{% load staticfiles %}
{% block content %}
    <div class="post-archive">
        {% regroup guidang_messages.object_list by add_time.year as dates_by_year %}
        {% for year in dates_by_year %}
            <h2>{{ year.grouper }}</h2>
            {% regroup year.list by add_time.month as dates_by_month %}

        {% for month in dates_by_month %}
            <ul class="listing">
            <li>
            <h3 >{{ month.grouper }}月</h3>
                <ul class="listing">
                {% for blog in month.list %}
                    <li>
                        <span class="date">{{ blog.add_time|date:"y/m/d" }}</span>
                        <a href="{% url "blog:message" blog.id %}" title="{{ blog.name }}">{{ blog.name }}</a>
                    </li>
                {% endfor %}
                </ul>
            </li>
            </ul>

            {% endfor %}
        {% endfor %}


    </div>
{% endblock %}